<template>
    <div class="changeLoanWay">
        <group title="原还款方式">
            <x-input v-model="oldWay" :show-clear="false" disabled text-align="center"></x-input>
        </group>
        <group title="新还款方式">
            <x-input v-model="newWay" :show-clear="false" disabled text-align="center"></x-input>
        </group>
        <div tag="div" class="btn" @click="show=true">
            <span>确定</span>
        </div>
        <x-dialog v-model="show" class="dialog">
            <div class="content">
                <h3>变更需知</h3>
                <p>借款人及抵押人带身份证、收入证明（需要公司盖章，月收入超过5000元，提供6个月银行流水）到零售信贷客户服务中心办理</p>
            </div>

            <div @click="toTime()" class="know">
                <span class="vux-close">知道了</span>
            </div>
        </x-dialog>
    </div>
</template>

<script>
import { XInput, Group, XDialog } from "vux";
export default {
  components: {
    XInput,
    Group,
    XDialog
  },
  methods: {
    toTime() {
      this.show = false;
      this.$router.push({
        path: "/select/time",
        query: { type: "ChangeWay", oldWay: this.oldWay, newWay: this.newWay }
      });
    }
  },
  data() {
    return {
      show: false,
      oldWay: "",
      newWay: ""
    };
  },
  created() {
      this.oldWay = this.$route.query.paytyp
      if(this.oldWay === '等额本金'){
          this.newWay = '等额本息'
      }else{
          this.newWay = '等额本金'
      }
  }
};
</script>

<style lang="less" scoped>
.changeLoanWay {
}
</style>

